/*
*  Copyright (C) 2010-2012 VMware, Inc. All rights reserved.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*     http://www.apache.org/licenses/LICENSE-2.0
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
dojo.declare("Login", wm.Page, {
"preferredDevice": "desktop",
start: function() {
if (window["PhoneGap"]) {
this.restorePhonegapCredentials();
} else {
this.usernameInput.setDataValue(dojo.cookie("user") || "");
this.usernameInput.focus();
}
if (this.wmTitle) this.wmTitle.setCaption(app.name || app.declaredClass);
this.loadingDialog.setMargin(parseInt(this.loadingDialog.widgetToCover.margin) + parseInt(this.loadingDialog.widgetToCover.border));
},
loginButtonClick: function(inSender) {
this.usernameInput.setDataValue(this.usernameInput.getDataValue().toLowerCase());
this.loginErrorMsg.setCaption("");
dojo.cookie("user", this.usernameInput.getDataValue(), {
expires: 365
});
},
onLoginSuccess: function() {
if (window["PhoneGap"]) {
this.phonegapCredentialStorage.setData({
name: this.usernameInput.getDataValue(),
dataValue: this.passwordInput.getDataValue()
});
}
},
loginFailed: function(inResponse) {
this.loginErrorMsg.setCaption("Invalid username or password.");
this.usernameInput.focus();
},
restorePhonegapCredentials: function() {
var username = this.phonegapCredentialStorage.getValue("name");
var password = this.phonegapCredentialStorage.getValue("dataValue");
if (username || password) {
this.usernameInput.setDataValue(username);
this.passwordInput.setDataValue(password);
if (username && password) {
this.loginVariable1.update();
}
}
},
svRegistrationSuccess2: function(inSender, inDeprecated) {
},
buttonRegistrationClick: function(inSender) {
var isValid = true;
if (this.luProjects.getDataValue() == undefined || this.luProjects.getDataValue() == "") {
isValid = false;
}
if (this.emailEditor1.getDataValue() == undefined || this.emailEditor1.getDataValue() == "" || this.emailEditor1.getInvalid()) {
isValid = false;
}
if (this.passwordEditor1.getDataValue() == undefined || this.passwordEditor1.getDataValue() == "") {
isValid = false;
}
if (this.nameEditor1.getDataValue() == undefined || this.nameEditor1.getDataValue() == "") {
isValid = false;
}
if (this.primaryPhoneEditor1.getDataValue() == undefined || this.primaryPhoneEditor1.getDataValue() == "" || this.primaryPhoneEditor1.getInvalid()) {
isValid = false;
}
if (this.luDoor.dataValue == undefined || this.luDoor.dataValue == "") {
isValid = false;
}
if (this.luBlock.dataValue == undefined || this.luBlock.dataValue == "") {
isValid = false;
}
if (isValid) {
this.usernameInput.setDataValue(this.emailEditor1.getDataValue());
this.passwordInput.setDataValue(this.passwordEditor1.getDataValue());
this.svRegistration.update();
} else {
this.ncRequiredFields.update();
}
},
svRegistrationError: function(inSender, inError) {
this.notifyRegistrationFail.input.setValue("text", inError);
this.notifyRegistrationFail.update();
},
svRegistrationSuccess: function(inSender, inDeprecated) {
this.usernameInput.setDataValue(this.emailEditor1.getDataValue());
this.passwordInput.setDataValue(this.passwordEditor1.getDataValue());
this.loginButton.click();
this.formPanel1.clearData();
},
lvValidateActivationCodeResult: function(inSender, inDeprecated) {
if (inSender.isEmpty()) {
this.ncInValidActivationCode.update();
//  this.textActivationCode.focus();
this.buttonRegistration.setDisabled(true);
} else {
this.ncValidActivationCode.update();
this.svBlocks.update();
this.buttonRegistration.setDisabled(false);
}
},
textActivationCodeChange: function(inSender, inDisplayValue, inDataValue, inSetByCode) {
if (this.textActivationCode.isDirty) {
this.lvValidateActivationCode.update();
}
},
svVerifyUserResult: function(inSender, inDeprecated) {
if (!inSender.isEmpty()) {
var resultValue = inSender.getItem(0);
if (resultValue.data.isActive) {
//call the login variable
this.loginVariable1.update();
} else {
//inactive user,don't let him login
this.loginErrorMsg.setCaption("Your account is inactive.Please call customer care to reactivate it.");
this.usernameInput.focus();
}
} else {
//user desnt exist in our system,login will take care of it.
this.loginVariable1.update();
}
},
_end: 0
});

Login.widgets = {
phonegapCredentialStorage: ["wm.Variable", {"saveInPhonegap":true,"type":"EntryData"}, {}],
loginVariable1: ["wm.LoginVariable", {}, {"onError":"loginFailed","onResult":"loadingDialog.hide","onSuccess":"onLoginSuccess"}, {
input: ["wm.ServiceInput", {"type":"loginInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"usernameInput.dataValue","targetProperty":"username"}, {}],
wire1: ["wm.Wire", {"expression":undefined,"source":"passwordInput.dataValue","targetProperty":"password"}, {}]
}]
}]
}],
notifyRegistration: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"Registered Successfully.Please login  using the credentials\"","targetProperty":"text"}, {}],
wire2: ["wm.Wire", {"expression":"\"Success\"","targetProperty":"cssClasses"}, {}],
wire3: ["wm.Wire", {"expression":"\"center center\"","targetProperty":"dialogPosition"}, {}],
wire1: ["wm.Wire", {"expression":"4000","targetProperty":"duration"}, {}]
}]
}]
}],
svRegistration: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"register","service":"RegistrationService"}, {"onError":"svRegistrationError","onSuccess":"svRegistrationSuccess","onSuccess1":"notifyRegistration","onSuccess2":"layerLogin"}, {
input: ["wm.ServiceInput", {"type":"registerInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire3: ["wm.Wire", {"expression":undefined,"source":"passwordEditor1.dataValue","targetProperty":"customer.password"}, {}],
wire4: ["wm.Wire", {"expression":undefined,"source":"secondaryPhoneEditor1.dataValue","targetProperty":"customer.secondaryPhone"}, {}],
wire5: ["wm.Wire", {"expression":undefined,"source":"primaryPhoneEditor1.dataValue","targetProperty":"customer.primaryPhone"}, {}],
wire6: ["wm.Wire", {"expression":undefined,"source":"nameEditor1.dataValue","targetProperty":"customer.name"}, {}],
wire7: ["wm.Wire", {"expression":undefined,"source":"emailEditor1.dataValue","targetProperty":"customer.email"}, {}],
wire1: ["wm.Wire", {"expression":undefined,"source":"luProjects.selectedItem.projectId","targetProperty":"activationCode"}, {}],
wire8: ["wm.Wire", {"expression":undefined,"source":"luBlock.selectedItem.blockName","targetProperty":"customer.block.blockName"}, {}],
wire: ["wm.Wire", {"expression":undefined,"source":"luDoor.selectedItem.doorName","targetProperty":"customer.door.doorName"}, {}],
wire2: ["wm.Wire", {"expression":undefined,"source":"luProjects.selectedItem.projectId","targetProperty":"customer.project.projectId"}, {}],
wire9: ["wm.Wire", {"expression":undefined,"source":"luProjects.selectedItem.projectName","targetProperty":"customer.project.projectName"}, {}]
}]
}]
}],
ncRequiredFields: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"Please enter all required fields\"","targetProperty":"text"}, {}],
wire1: ["wm.Wire", {"expression":"4000","targetProperty":"duration"}, {}],
wire2: ["wm.Wire", {"expression":"\"Warning\"","targetProperty":"cssClasses"}, {}],
wire3: ["wm.Wire", {"expression":"\"bottom center\"","targetProperty":"dialogPosition"}, {}]
}]
}]
}],
notifyRegistrationFail: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire1: ["wm.Wire", {"expression":"4000","targetProperty":"duration"}, {}],
wire: ["wm.Wire", {"expression":"\"Error\"","targetProperty":"cssClasses"}, {}],
wire2: ["wm.Wire", {"expression":"\"bottom center\"","targetProperty":"dialogPosition"}, {}],
wire3: ["wm.Wire", {"expression":undefined,"source":"svRegistration.dataValue","targetProperty":"text"}, {}]
}]
}]
}],
ncInValidActivationCode: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"Activation Code not found.Please enter the correct one.\"","targetProperty":"text"}, {}],
wire1: ["wm.Wire", {"expression":"4000","targetProperty":"duration"}, {}],
wire2: ["wm.Wire", {"expression":"\"Error\"","targetProperty":"cssClasses"}, {}],
wire3: ["wm.Wire", {"expression":"\"bottom center\"","targetProperty":"dialogPosition"}, {}]
}]
}]
}],
ncValidActivationCode: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire1: ["wm.Wire", {"expression":"4000","targetProperty":"duration"}, {}],
wire3: ["wm.Wire", {"expression":"\"bottom center\"","targetProperty":"dialogPosition"}, {}],
wire2: ["wm.Wire", {"expression":"\"Success\"","targetProperty":"cssClasses"}, {}],
wire: ["wm.Wire", {"expression":"\"Activation Code Found.Please Enter remaining data.\"","targetProperty":"text"}, {}]
}]
}]
}],
lvValidateActivationCode: ["wm.LiveVariable", {"autoUpdate":false,"inFlightBehavior":"executeLast","startUpdate":false,"type":"com.servicelivedb.data.Project"}, {"onResult":"lvValidateActivationCodeResult"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"textActivationCode.dataValue","targetProperty":"filter.projectId"}, {}],
wire1: ["wm.Wire", {"expression":"true","targetProperty":"filter.active"}, {}]
}],
liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Project","view":[
{"caption":"ProjectId","sortable":true,"dataIndex":"projectId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"ProjectName","sortable":true,"dataIndex":"projectName","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null},
{"caption":"Address","sortable":true,"dataIndex":"address","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":2,"subType":null},
{"caption":"Active","sortable":true,"dataIndex":"active","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":3,"subType":null},
{"caption":"PrimaryPhone","sortable":true,"dataIndex":"primaryPhone","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":4,"subType":null},
{"caption":"SecondaryPhone","sortable":true,"dataIndex":"secondaryPhone","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":5,"subType":null},
{"caption":"Email","sortable":true,"dataIndex":"email","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":6,"subType":null},
{"caption":"Website","sortable":true,"dataIndex":"website","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":7,"subType":null},
{"caption":"Description","sortable":true,"dataIndex":"description","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":8,"subType":null},
{"caption":"Image","sortable":true,"dataIndex":"image","type":"byte","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":9,"subType":null}
]}, {}]
}],
svBlocks: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"getBlocksByProject","service":"serviceliveDB"}, {}, {
input: ["wm.ServiceInput", {"type":"getBlocksByProjectInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"luProjects.selectedItem.projectId","targetProperty":"projectId"}, {}]
}]
}]
}],
svDoors: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"getDoorsByProjectBlock","service":"serviceliveDB"}, {}, {
input: ["wm.ServiceInput", {"type":"getDoorsByProjectBlockInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"luBlock.selectedItem.blockId","targetProperty":"blockId"}, {}]
}]
}]
}],
svProjects: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"getUniqueProjects","service":"serviceliveDB"}, {}, {
input: ["wm.ServiceInput", {"type":"getUniqueProjectsInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"true","targetProperty":"activeFlag"}, {}]
}]
}]
}],
svVerifyUser: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"getLoginStatus","service":"serviceliveDB"}, {"onResult":"svVerifyUserResult"}, {
input: ["wm.ServiceInput", {"type":"getLoginStatusInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"usernameInput.dataValue","targetProperty":"username"}, {}]
}]
}]
}],
loadingDialog: ["wm.LoadingDialog", {"_classes":{"domNode":["rounded"]},"caption":"Loading....","captionWidth":"100px","serviceVariableToTrack":["loginVariable1","lvValidateActivationCode","lvDoor","lvBlocks","svRegistration"]}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"loginInputPanel","targetProperty":"widgetToCover"}, {}]
}]
}],
layoutBox: ["wm.Layout", {"styles":{"backgroundImage":"resources/images/mobile/background_m.jpg"},"width":"60%"}, {}, {
headerPanel: ["wm.Panel", {"height":"111px","horizontalAlign":"left","layoutKind":"left-to-right","styles":{},"verticalAlign":"top","width":"100%"}, {}, {
TitleBar: ["wm.Panel", {"_classes":{"domNode":["titlebar"]},"border":"0,0,4,0","height":"100%","horizontalAlign":"center","layoutKind":"left-to-right","styles":{},"verticalAlign":"top","width":"100%"}, {}, {
picture1: ["wm.Picture", {"aspect":"h","source":"resources/images/desktop/h2m_logo_d.jpg","styles":{}}, {}],
picture2: ["wm.Picture", {"aspect":"h","height":"111px","source":"resources/images/desktop/h2m_header.jpg","styles":{},"width":"364px"}, {}],
appNameLabel: ["wm.Label", {"_classes":{"domNode":["wm_FontSizePx_24px"]},"align":"left","caption":" Welcome to NGV","height":"100%","padding":"4","showing":false,"styles":{"color":"#ed1717"},"width":"434px"}, {}]
}]
}],
loginMainPanel: ["wm.Panel", {"height":"100%","horizontalAlign":"center","layoutKind":"left-to-right","padding":"10","styles":{},"verticalAlign":"top","width":"100%"}, {}, {
panel4: ["wm.Panel", {"height":"100%","horizontalAlign":"left","margin":"2","padding":"2","styles":{},"verticalAlign":"top","width":"100%"}, {}],
panelCenter: ["wm.Panel", {"height":"500px","horizontalAlign":"left","styles":{},"verticalAlign":"top","width":"550px"}, {}, {
accordionLayers1: ["wm.AccordionLayers", {"border":"2","borderColor":"#888888","captionHeight":"40","defaultLayer":0,"margin":"2","padding":"2"}, {}, {
layerLogin: ["wm.Layer", {"borderColor":"","caption":"                                      Login","horizontalAlign":"center","styles":{},"themeStyleType":"ContentPanel","verticalAlign":"middle"}, {}, {
loginInputPanel: ["wm.HeaderContentPanel", {"_classes":{"domNode":["rounded"]},"desktopHeight":"256px","deviceType":null,"enableTouchHeight":true,"fitToContentHeight":true,"height":"220px","horizontalAlign":"center","margin":"10","mobileHeight":"290px","padding":"10","styles":{"color":""},"verticalAlign":"top","width":"390px"}, {"onEnterKeyPress":"loginButton.click"}, {
panel1: ["wm.Panel", {"fitToContentHeight":true,"height":"72px","horizontalAlign":"left","verticalAlign":"top","width":"100%"}, {}, {
usernameInput: ["wm.Text", {"border":"0","caption":"Email Id","captionAlign":"left","dataValue":undefined,"desktopHeight":"35px","displayValue":"","height":"35px","mobileHeight":"45px","placeHolder":"Email Id","regExp":"^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$","required":true,"styles":{},"width":"100%"}, {}],
passwordInput: ["wm.Text", {"border":"0","caption":"Password","captionAlign":"left","dataValue":undefined,"desktopHeight":"35px","displayValue":"","height":"35px","mobileHeight":"45px","password":true,"placeHolder":"Password","required":true,"styles":{},"width":"100%"}, {}]
}],
loginButtonPanel: ["wm.Panel", {"height":"50px","horizontalAlign":"right","layoutKind":"left-to-right","padding":"4","width":"100%"}, {}, {
loginErrorMsg: ["wm.Label", {"align":"center","caption":" ","height":"100%","padding":"4","singleLine":false,"width":"100%"}, {}, {
format: ["wm.DataFormatter", {}, {}]
}],
loginButton: ["wm.Button", {"border":"1","borderColor":"#000000","caption":"Login","height":"100%","width":"90px"}, {"onclick":"loginButtonClick","onclick4":"svVerifyUser"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"${usernameInput.invalid} || ${passwordInput.invalid}","targetProperty":"disabled"}, {}]
}]
}]
}],
panel6: ["wm.Panel", {"desktopHeight":"56px","enableTouchHeight":true,"height":"56px","horizontalAlign":"left","mobileHeight":"72px","verticalAlign":"top","width":"100%"}, {}, {
chkTermsCondition: ["wm.Checkbox", {"border":"0","caption":"By logging in ,I agree to terms and conditions","captionSize":"300px","dataValue":true,"desktopHeight":"35px","displayValue":true,"height":"35px","startChecked":true,"styles":{"fontSize":"12px"},"width":"100%"}, {}],
txtCopyright: ["wm.Text", {"border":"0","caption":"Copyright 2013 Technology Port","captionSize":"100%","dataValue":undefined,"desktopHeight":"30px","displayValue":"","height":"30px","readonly":true,"styles":{},"width":"100%"}, {}]
}]
}]
}],
layerRegistration: ["wm.Layer", {"borderColor":"","caption":"Registration","horizontalAlign":"left","styles":{"backgroundImage":"resources/images/background/bg_large_pink.png"},"themeStyleType":"","verticalAlign":"top"}, {}, {
panel2: ["wm.HeaderContentPanel", {"borderColor":"","height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","margin":"2","padding":"2","verticalAlign":"top","width":"100%"}, {}, {
formPanel1: ["wm.FormPanel", {"captionSize":"150px","desktopHeight":"422px","editorHeight":"35px","height":"422px","mobileHeight":"422px","styles":{},"type":"com.servicelivedb.data.Customer"}, {}, {
luProjects: ["wm.Lookup", {"border":"0","caption":"Project","captionSize":"150px","dataType":"com.servicelivedb.data.output.GetUniqueProjectsRtnType","dataValue":undefined,"desktopHeight":"35px","displayField":"projectName","displayValue":"","height":"35px","required":true,"width":"100%"}, {"onchange":"svBlocks"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"svProjects","targetProperty":"dataSet"}, {}]
}]
}],
textActivationCode: ["wm.Number", {"border":"0","caption":"Activation Code","captionSize":"150px","dataValue":undefined,"desktopHeight":"35px","displayValue":"","height":"35px","placeHolder":"Project Code","showing":false,"styles":{},"width":"100%"}, {"onchange":"textActivationCodeChange"}],
emailEditor1: ["wm.Text", {"border":"0","caption":"Email","captionSize":"150px","changeOnKey":true,"dataValue":"","desktopHeight":"35px","displayValue":"","emptyValue":"emptyString","height":"35px","maxChars":"50","placeHolder":"Email Id","regExp":"^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$","required":true,"styles":{},"width":"100%"}, {}],
passwordEditor1: ["wm.Text", {"border":"0","caption":"Password","captionSize":"150px","changeOnKey":true,"dataValue":"","desktopHeight":"35px","displayValue":"","emptyValue":"emptyString","height":"35px","maxChars":"50","password":true,"placeHolder":"Password","required":true,"width":"100%"}, {}],
nameEditor1: ["wm.Text", {"border":"0","caption":"Name","captionSize":"150px","changeOnKey":true,"dataValue":"","desktopHeight":"35px","displayValue":"","emptyValue":"emptyString","height":"35px","maxChars":"100","placeHolder":"First Name Last Name","required":true,"width":"100%"}, {}],
luBlock: ["wm.Lookup", {"border":"0","caption":"Block","captionSize":"150px","dataType":"com.servicelivedb.data.Block","dataValue":undefined,"desktopHeight":"35px","displayField":"blockName","displayValue":"","height":"35px","placeHolder":"Select a Block","required":true,"width":"100%"}, {"onchange":"svDoors"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"svBlocks","targetProperty":"dataSet"}, {}]
}]
}],
luDoor: ["wm.Lookup", {"border":"0","caption":"Door","captionSize":"150px","dataType":"com.servicelivedb.data.Door","dataValue":undefined,"desktopHeight":"35px","displayField":"doorName","displayValue":"","height":"35px","placeHolder":"Select a Door","required":true,"width":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"svDoors","targetProperty":"dataSet"}, {}]
}]
}],
primaryPhoneEditor1: ["wm.Text", {"border":"0","caption":"PrimaryPhone","captionSize":"150px","changeOnKey":true,"dataValue":"","desktopHeight":"35px","displayValue":"","emptyValue":"emptyString","height":"35px","maxChars":"10","placeHolder":"Enter a valid Phone Number","regExp":"^[0-9]{10}","required":true,"styles":{},"width":"100%"}, {}],
secondaryPhoneEditor1: ["wm.Text", {"border":"0","caption":"SecondaryPhone","captionSize":"150px","changeOnKey":true,"dataValue":"","desktopHeight":"35px","displayValue":"","emptyValue":"emptyString","height":"35px","placeHolder":"Enter an alternative contact number","regExp":"^[0-9]{10}","styles":{},"width":"100%"}, {}],
chkTermsConditions: ["wm.Checkbox", {"border":"0","caption":"I agree to terms and condition","captionSize":"350px","dataValue":false,"desktopHeight":"30px","displayValue":false,"height":"30px","styles":{},"width":"100%"}, {}],
panel3: ["wm.Panel", {"desktopHeight":"50px","enableTouchHeight":true,"height":"50px","horizontalAlign":"right","layoutKind":"left-to-right","mobileHeight":"40px","verticalAlign":"top","width":"100%"}, {}, {
label1: ["wm.Label", {"caption":"<span style='color:red'>* </span> Required fields","padding":"4","styles":{"fontWeight":"bold"},"width":"338px"}, {}],
buttonRegistration: ["wm.Button", {"border":"1","caption":"Register","height":"100%","width":"120px"}, {"onclick":"buttonRegistrationClick"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"!${chkTermsConditions.checked}","targetProperty":"disabled"}, {}]
}]
}]
}],
labelCopyright: ["wm.Label", {"align":"right","caption":"Copyright 2013 Technology Port","link":"http://www.technologyport.net/","padding":"4","styles":{"color":"#040e7a"},"width":"100%"}, {}]
}]
}]
}]
}]
}],
panel5: ["wm.Panel", {"height":"100%","horizontalAlign":"left","styles":{},"verticalAlign":"top","width":"100%"}, {}]
}]
}]
};

Login.prototype._cssText = '.Login .Login-loginErrorMsg {\
font-size: 12px; color: red\
}\
.Login .Login-wmTitle {\
font-size: 20px;\
}\
.wmmobile .Login .wmeditor .wmlabel {\
font-size: 16px;\
}\
.wmmobile .Login .wmeditor input {\
font-size: 20px;\
}\
.Login div .rounded {\
-webkit-border-radius: 8px;\
-moz-border-radius: 8px;\
border-radius: 8px;\
}\
';
Login.prototype._htmlText = '<div id="sample">Sample Markup</div>\
';